package com.zhangsr.zus.remoting.api;

import com.zhangsr.zus.remoting.api.buffer.ChannelBuffer;

import java.io.IOException;

/**
 * @Author: zhangsr
 */
public interface Codec2 {

    void encode(Channel channel, ChannelBuffer buffer, Object message) throws IOException;

    Object decode(Channel channel, ChannelBuffer buffer) throws IOException;

    enum DecodeResult {
        NEED_MORE_INPUT, SKIP_SOME_INPUT
    }
}

